package oop2;

import oop1.School;

/**
 * @author oldliu
 * @since 1.0
 */
public class SchoolArray {
    public static void main(String[] args) {
        School p[]=new School[30];
        p[0]=new School();
        p[0].name="南京中博中心";
        p[0].rooms=20;
        p[0].labs=8;

        p[0].show();
        School s2=new School();
        s2.name="上海长治中心";
        s2.labs=9;
        s2.rooms=8;
        p[1]=s2;
        p[1].show();
        for(School ss:p)
            System.out.println(ss);
        // System.out.println(p[0]);
       // p[0].show();
        System.out.println("-------------------------");
        //int[]ar={1,2,4};
        School []s3={new School(),new School(),new School(),new School(),new School()};
        //s3[s3.length-1].show();
        Calc cc=new Calc();
        cc.inc3(s3);
        System.out.println("修改了对象数组后：");
        for(School s1:s3)
            s1.show();
    }
}
